home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.04 Apr 97 / OpenDocExtentions / ImagePart / _SOM_ / som_ImagePart.xh < prev    next >
Encoding:
Text File  |  1996-06-19  |  3.5 KB  |  161 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Sadistikal:KSS:ImagePart:_SOM_:som_ImagePart.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_Module_KSS_defined
  11. #define SOM_Module_KSS_defined 1
  12. #include <som.xh>
  13.  
  14. /*
  15.  * Start of user-defined types:
  16.  */
  17. class SOMClass;
  18. class SOMObject;
  19. class ODFrame;
  20. class ODFacet;
  21. class ODObject;
  22. class ODExtension;
  23. class ODRefCntObject;
  24. class ODPersistentObject;
  25. class ODStorageUnit;
  26. class ODPart;
  27. class ODCanvas;
  28. class ODDragItemIterator;
  29. class ODEmbeddedFramesIterator;
  30. class ODLink;
  31. class ODLinkSource;
  32. class ODObjectSpec;
  33. class ODShape;
  34. class ODStorageUnitView;
  35. class ODTypeList;
  36.  
  37. /*
  38.  * End of user-defined types.
  39.  */
  40. #endif /* SOM_Module_KSS_defined */
  41.  
  42. #ifndef SOM_KSS_som_ImagePart_xh
  43. #define SOM_KSS_som_ImagePart_xh
  44.  
  45. class KSS_som_ImagePart;
  46.  
  47. #define KSS_som_ImagePart_MajorVersion 1
  48. #define KSS_som_ImagePart_MinorVersion 2
  49.  
  50. /* C++ SOM defs */
  51. #include <somcls.xh>
  52. #include <somcm.xh>
  53.  
  54. /* C++ parent defs */
  55. #ifndef SOM_ODPart_xh
  56. #include <Part.xh>
  57. #endif
  58.  
  59. #ifndef KSS_som_ImagePart_API
  60. #define KSS_som_ImagePart_API
  61. /*
  62.  * -- The Class API
  63.  */
  64.  
  65. /*
  66.  * Start of user-defined types:
  67.  */
  68.  
  69. /*
  70.  * End of user-defined types.
  71.  */
  72.  
  73. #ifdef OLDIBMSOMAPISUPPORT
  74. #define KSS_som_ImagePartCClassData KSS_som_ImagePartClassData
  75. #define KSS_som_ImagePartNewClass(major,minor) somNewVersionedClassReference(KSS_som_ImagePart,major,minor)
  76. #endif
  77.  
  78. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  79. #define KSS_som_ImagePartMetaClass SOMClass
  80.  
  81.  
  82. /* The API to the KSS_som_ImagePart class object, and the methods it introduces. */
  83. SOMEXTERN struct KSS_som_ImagePartClassDataStructure {
  84. #ifdef OLDIBMSOMAPISUPPORT
  85.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  86. #else
  87.     long zero;
  88. #endif
  89.     somStaticClassInfo *sci;
  90.     somDToken        instanceDataToken;
  91.     long reserved [3];
  92. } SOMDLINK KSS_som_ImagePartClassData;
  93.  
  94. #if !defined(KSS_som_ImagePart_Class_Source) && !defined(SOM_Module_som_imagepart_Source)
  95. #if PRAGMA_IMPORT_SUPPORTED
  96. #pragma import list KSS_som_ImagePartClassData
  97. #endif
  98. #endif
  99.  
  100.  
  101. /*
  102.  * -- Typedefs and inline method declarations for left path inherited methods
  103.  * -- are omitted because this compilation had -museinheritedmethods in effect
  104.  */
  105.  
  106.  
  107. /*
  108.  * -- Typedefs for KSS_som_ImagePart Method Procedures
  109.  */
  110. SOMEXTERN {
  111. }
  112.  
  113. #endif /* KSS_som_ImagePart_API */
  114.  
  115.  
  116. /*
  117.  * -- This emitter treats Method Tokens as Thunks by default.
  118.  * -- Use the sc modifier "nothunks" to change this default
  119.  */
  120. #undef somresolve_
  121. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  122.  
  123. /*
  124.  * -- The C++ Wrapper Class for KSS_som_ImagePart
  125.  */
  126. class KSS_som_ImagePart : public ODPart
  127. {
  128. public:
  129.  
  130. // KSS_som_ImagePart::new registers use of the class object, and then uses somNew
  131. // to allocate memory and load the object method table pointer. 
  132. void *operator new(size_t size)
  133. {
  134.     SOM_IgnoreWarning(size);
  135.     // Allocate memory using the default allocator for KSS_som_ImagePart, and
  136.     // clear mem & set method table pointer, call basic initialization
  137. #ifdef SOMCHKNULL
  138.     void * __somResult = (void *)
  139.       somNewObject(KSS_som_ImagePart);
  140.     SOMCHKNULL(__somResult);
  141.     return __somResult;
  142. #else
  143.     return (void*) somNewObject(KSS_som_ImagePart);
  144. #endif
  145. }
  146.  
  147. // KSS_som_ImagePart::delete uses the default deallocator for the object's class.
  148. void operator delete(void * obj)
  149. {
  150.     if (obj) {
  151.         SOM_Resolve(obj,SOMObject,somFree)
  152.            ( (SOMObject*) obj );
  153.     }
  154. }
  155.  
  156. };   /* KSS_som_ImagePart */
  157.  
  158.  
  159.  
  160. #endif       /* SOM_KSS_som_ImagePart_xh */
  161.